package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TFocusMapper;
import com.ruoyi.system.domain.TFocus;
import com.ruoyi.system.service.ITFocusService;

/**
 * 关注Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-24
 */
@Service
public class TFocusServiceImpl implements ITFocusService 
{
    @Autowired
    private TFocusMapper tFocusMapper;

    /**
     * 查询关注
     * 
     * @param followId 关注主键
     * @return 关注
     */
    @Override
    public TFocus selectTFocusByFollowId(Long followId)
    {
        return tFocusMapper.selectTFocusByFollowId(followId);
    }

    /**
     * 查询关注列表
     * 
     * @param tFocus 关注
     * @return 关注
     */
    @Override
    public List<TFocus> selectTFocusList(TFocus tFocus)
    {
        return tFocusMapper.selectTFocusList(tFocus);
    }

    /**
     * 新增关注
     * 
     * @param tFocus 关注
     * @return 结果
     */
    @Override
    public int insertTFocus(TFocus tFocus)
    {
        tFocus.setCreateTime(DateUtils.getNowDate());
        return tFocusMapper.insertTFocus(tFocus);
    }

    /**
     * 修改关注
     * 
     * @param tFocus 关注
     * @return 结果
     */
    @Override
    public int updateTFocus(TFocus tFocus)
    {
        tFocus.setUpdateTime(DateUtils.getNowDate());
        return tFocusMapper.updateTFocus(tFocus);
    }

    /**
     * 批量删除关注
     * 
     * @param followIds 需要删除的关注主键
     * @return 结果
     */
    @Override
    public int deleteTFocusByFollowIds(Long[] followIds)
    {
        return tFocusMapper.deleteTFocusByFollowIds(followIds);
    }

    /**
     * 删除关注信息
     * 
     * @param followId 关注主键
     * @return 结果
     */
    @Override
    public int deleteTFocusByFollowId(Long followId)
    {
        return tFocusMapper.deleteTFocusByFollowId(followId);
    }
}
